<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<title>Class Selector (E.myclass)</title>
<meta name="description" content="CSS3参考手册之: 类选择符(E.class)" />
<meta name="keywords" content="类选择符, css3选择符, css3, css3参考手册" />
<meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com" />
<meta name="robots" content="all" />
<!--[if lte IE 8]>
<script src="../../js/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="../../skin/article.css" />
</head>
<body>
<nav id="guide" class="g-mod">
	<div class="from">
		<a href="http://css.doyoe.com/" target="_blank">CSS3参考手册</a>
		<span>&#187;</span>
		<a href="../index.htm">选择符列表</a>
		<span>&#187;</span>
		<a href="index.htm" id="category" rel="selectors/element" name="class">元素选择符</a>
		<span>&#187;</span>
	</div>
	<div class="to">
		<span class="label">相关内容：</span>
		<div class="g-combobox g-transition">
			<a href="?" class="g-transition target">
				<strong>其它元素选择符参考</strong>
				<span>选择其它项<!--[if lte IE 7]><ins>IE7 and earlier, Get to die</ins><![endif]--></span>
			</a>
			<div class="g-transition list">
				<ul>
					<!-- 插入分类快速导航 -->
				</ul>
			</div>
		</div>
	</div>
</nav>
<header id="hd">
	<section id="title" class="g-mod">
		<h1 class="tit">类选择符(E.class)</h1>
		<ul class="info">
			<li><strong>版本：CSS1</strong></li>
		</ul>
		<!-- 插入浏览器信息 -->
	</section>
</header>
<section id="bd">
	<section id="syntax" class="g-mod g-attr">
		<h2 class="tit">语法：</h2>
		<div class="cont">
			<p><strong>E.myclass</strong> { sRules }</p>
		</div>
	</section>
	<section id="intro" class="g-mod g-attr">
		<h2 class="tit">说明：</h2>
		<div class="cont">
			<strong>以class属性包含myclass的E对象作为选择符。</strong>
			<ul>
				<li>类选择符(Class Selector)</li>
				<li>不同于<a href="id.htm">ID选择符</a>的唯一性，类选择符可以同时定义多个，如：
					<div class="gquote">
						<p class="gquote-tit"><strong>定义多个类：</strong></p>
						<blockquote class="gquote-cont"><code><xmp>.a {
	color: #f00;
}
.b {
	font-weight: 700;
}
<div class="a b">给某个div元素定义.a和.b两个类</div></xmp></code></blockquote>
						<p class="gquote-info">注意，id选择符不能在同个元素上定义多个，比如id="a b"就是错误的写法</p>
					</div>
					<div class="gquote">
						<p class="gquote-tit"><strong>类选择符高级用法：多类选择符</strong></p>
						<blockquote class="gquote-cont"><code><xmp>.a.b {
	color: #f00;
}
<div class="a b">多类选择符使用方法</div></xmp></code></blockquote>
						<p class="gquote-info">此例命中同时拥有.a和.b两个类的元素。需要注意的是IE6并不支持多类选择符，如：.a.b{}将会被视为：.b{}</p>
					</div>
				</li>
			</ul>
		</div>
	</section>
	<section id="compatible" class="g-mod g-attr">
		<h2 class="tit">兼容性：</h2>
		<div class="cont">
			<ul class="support-type">
				<li><span class="support">浅绿</span> = 支持</li>
				<li><span class="unsupport">红色</span> = 不支持</li>
				<li><span class="partsupport">粉色</span> = 部分支持</li>
			</ul>
			<table class="g-data">
				<thead>
					<tr>
						<th>IE</th>
						<th>Firefox</th>
						<th>Chrome</th>
						<th>Safari</th>
						<th>Opera</th>
						<th>iOS Safari</th>
						<th>Android Browser</th>
						<th>Android Chrome</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="unsupport">6.0 <sup><a href="#support1">#1</a></sup></td>
						<td class="support" rowspan="2">2.0+</td>
						<td class="support" rowspan="2">4.0+</td>
						<td class="support" rowspan="2">3.1+</td>
						<td class="support" rowspan="2">3.5+</td>
						<td class="support" rowspan="2">3.2+</td>
						<td class="support" rowspan="2">2.1+</td>
						<td class="support" rowspan="2">18.0+</td>
					</tr>
					<tr>
						<td class="support">7.0+</td>
					</tr>
				</tbody>
			</table>
			<ol class="support-info">
				<li id="support1">不支持多类选择符，形如：<code class="incode">.a.b {}</code></li>
			</ol>
		</div>
	</section>
	<section id="example" class="g-mod g-attr">
		<h2 class="tit">示例：</h2>
		<div class="cont">
			<textarea cols="90" rows="10">
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<title>class选择符 (E.myclass)_CSS参考手册_web前端开发参考手册系列</title>
<meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com" />
<style>
.title {
	font-size: 20px;
}
p.content {
	font-size: 13px;
}
.content.note {
	font-size: 30px;
}
</style>
</head>
<body>
<h1 class="title">标题</h1>
<p class="content">正文内容</p>
<p class="content note">多类选择符的使用</p>
</body>
</html>
			</textarea>
			<p><input type="button" value="运行" class="g-btn g-btn-sure" /></p>
		</div>
	</section>
</section>
<footer id="ft">
	<aside id="rights" class="g-mod">
		<!-- 插入浏览器及版权信息 -->
	</aside>
</footer>
<script src="../../js/jquery.js"></script>
<script src="../../js/inner.js"></script>
</body>
</html>